package org.elepower.dao;

import org.apache.ibatis.annotations.Param;
import org.elepower.pojo.PsInspectiontaskDetails;
import org.elepower.pojo.PsInspectiontask_main;
import org.elepower.pojo.PsSolvetaskDetail;

import java.util.List;

public interface Inspectiontask_mainDao extends Common<PsInspectiontask_main,Integer>{

    /**
     * 条件查找
     * @param psInspectiontask_main
     * @return
     */
    public List<PsInspectiontask_main> getCondition(PsInspectiontask_main psInspectiontask_main);

    /**
     * 根据任务编号查询任务信息
     * @param taskId
     * @return
     */
    public PsInspectiontask_main getTaskId(Integer taskId);

    /**
     * 修改任务为已分配
     * @param taskId
     */
    public void updateTaskFenPei(Integer taskId);

    /**
     * 取消任务
     */
    public void updateTaskState(Integer taskId);

    /**
     * 查询未取消的巡检任务
     * @param psInspectiontask_main
     * @return
     */
    public List<PsInspectiontask_main> getNoCancelTask(PsInspectiontask_main psInspectiontask_main);

    /**
     * 修改巡检任务状态
     * @param taskId
     * @param stateId
     * @param stateName
     */
    public void updateTaskStateAll(@Param("taskId") Integer taskId,@Param("stateId") Integer stateId,@Param("stateName") String stateName);

    /**
     * 修改巡检员
     * @param id
     */
    public void updateInspectors(@Param("id") Integer id,@Param("inspectors") String inspectors);

    /**
     * 巡检任务统计
     * @return
     */
    public List<PsInspectiontaskDetails> inspectionStatistical(PsInspectiontaskDetails condition);

    /**
     * 消缺任务统计
     * @param condition
     * @return
     */
    public List<PsSolvetaskDetail> solveStatistical(PsSolvetaskDetail condition);
}
